home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / tydhtml / dyn.exe / CHAP10 / dyn10_4.txt < prev    next >
Encoding:
Text File  |  1997-10-02  |  4.5 KB  |  120 lines

  1. <HTML>
  2. <HEAD>
  3. </HEAD>
  4. <BODY BACKGROUND="water.jpg" TEXT=#FFFFFF LINK=FFFF22 VLINK=FF22FF>
  5. <H2>Squid Tracking -- How Do We Do It?</H2>
  6. <TABLE>
  7. <TR><TD WIDTH=320>
  8. <DIV ID=AnimDiv STYLE="position:relative;width:320px;height:320px">
  9. <IMG SRC="sonard.gif" ID=sonard BORDER=0
  10.  STYLE="container:positioned;position:absolute;
  11.  TOP:0pt;LEFT:150px;WIDTH:32px;HEIGHT:32px;ZINDEX:0;">
  12. <IMG SRC="sonaru.gif" ID=sonaru BORDER=0
  13.  STYLE="container:positioned;position:absolute;
  14.  TOP:0pt;LEFT:150px;WIDTH:32px;HEIGHT:32px;ZINDEX:0;">
  15. <IMG SRC="squid2.gif" ID=squid1 BORDER=0 onclick="Guess();"
  16.  STYLE="container:positioned;position:absolute;
  17.  TOP:170pt;LEFT:20px;WIDTH:64px;HEIGHT:64px;ZINDEX:1;">
  18. <IMG SRC="squid2.gif" ID=squid2 BORDER=0 onclick="Guess();"
  19.  STYLE="container:positioned;position:absolute;
  20.  TOP:190pt;LEFT:20px;WIDTH:64px;HEIGHT:64px;ZINDEX:2;">
  21. <IMG SRC="squid2.gif" ID=squid3 BORDER=0 onclick="Guess();"
  22.  STYLE="container:positioned;position:absolute;
  23.  TOP:180pt;LEFT:0px;WIDTH:64px;HEIGHT:64px;ZINDEX:3;">
  24. <IMG SRC="boat.jpg" BORDER=0 STYLE="container:positioned;position:absolute;
  25.  TOP:0pt;LEFT:0px;WIDTH:320px;HEIGHT:50px;ZINDEX:5;" onclick="cycle();">
  26. <IMG SRC="bottom.gif" BORDER=0 STYLE="container:positioned;position:absolute;
  27.  TOP:240pt;LEFT:0px;WIDTH:320px;HEIGHT:50px;ZINDEX:5;">
  28. </DIV></TD><TD>
  29. <FONT COLOR=#FFFF00><I>To track squid we use a sophisticated sonar device
  30.  that emits sound waves down into the ocean
  31. from the surface.  The sound waves will either bounce off the ocean floor
  32. or bounce off the squid if they get between the emitting boat and the 
  33. ocean floor. We get very precise images of each squid that gets in the way of 
  34. the sound waves.  In fact, we can identify each squid as an individual unique 
  35. from all squid we have catalogued.</I></FONT><BR>
  36. <B>Go ahead and click on the boat to start an animation.</B>
  37. </TD></TR></TABLE>
  38. <OBJECT ID="pathone"
  39.         CLASSID="CLSID:E0E3CC60-6A80-11D0-9B40-00A0C903AA7F">
  40. <PARAM NAME=XSeries
  41.         VALUE="0,20;10,50;20,80;30,115;40,150;50,185;60,220;70,255;80,300">
  42. <PARAM NAME=YSeries
  43.         VALUE="0,170;10,170;20,170;30,170;40,170;50,170;60,170;70,170;80,170">
  44. </OBJECT>
  45. <OBJECT ID="pathtwo"
  46.         CLASSID="CLSID:E0E3CC60-6A80-11D0-9B40-00A0C903AA7F">
  47. <PARAM NAME=XSeries
  48.         VALUE="0,20;10,55;20,80;30,110;40,135;50,170;60,200;70,230;80,270">
  49. <PARAM NAME=YSeries
  50.         VALUE="0,190;10,190;20,193;30,195;40,197;50,194;60,192;70,190;80,190">
  51. </OBJECT>
  52. <OBJECT ID="paththree"
  53.         CLASSID="CLSID:E0E3CC60-6A80-11D0-9B40-00A0C903AA7F">
  54. <PARAM NAME=XSeries
  55.         VALUE="0,0;10,20;20,50;30,80;40,100;50,128;60,148;70,178;80,210">
  56. <PARAM NAME=YSeries
  57.         VALUE="0,180;10,182;20,185;30,190;40,185;50,181;60,179;70,176;80,179">
  58. </OBJECT>
  59. <OBJECT ID="pathfour"
  60.         CLASSID="CLSID:E0E3CC60-6A80-11D0-9B40-00A0C903AA7F">
  61. <PARAM NAME=XSeries
  62.         VALUE="0,150;10,150;20,150;30,150;40,150;50,150;60,150;70,150;80,150">
  63. <PARAM NAME=YSeries
  64.         VALUE="0,20;10,50;20,90;30,135;40,180;41,0">
  65. </OBJECT>
  66. <OBJECT ID="pathfive"
  67.         CLASSID="CLSID:E0E3CC60-6A80-11D0-9B40-00A0C903AA7F">
  68. <PARAM NAME=XSeries
  69.         VALUE="0,150;10,150;20,150;30,150;40,150;50,150;60,150;70,150;80,150">
  70. <PARAM NAME=YSeries
  71.         VALUE="40,0;41,180;50,135;60,90;70,50;80,20">
  72. </OBJECT>
  73. <SCRIPT LANGUAGE=VBScript>
  74. function cycle()
  75.         dim itimer
  76.         pathone.Target = squid1.Style
  77.         pathtwo.Target = squid2.Style
  78.         paththree.Target = squid3.Style
  79.         pathfour.Target = sonard.Style
  80.         pathfive.Target = sonaru.Style
  81.         squid1.style.visibility="visible"
  82.         squid2.style.visibility="visible"
  83.         squid3.style.visibility="visible"
  84.         sonard.style.visibility="visible"
  85.         sonaru.style.visibility="visible"
  86.         pathone.Play
  87.         pathtwo.Play
  88.         paththree.Play
  89.         pathfour.Play
  90.         pathfive.Play
  91.         itimer = setTimeout( "Moves()", 50)
  92. End function
  93.  
  94. Sub Moves
  95.         dim itimer
  96.         pathone.Tick
  97.         pathtwo.Tick
  98.         paththree.Tick
  99.         pathfour.Tick
  100.         pathfive.Tick
  101.         if currentTick < 9 then
  102.             itimer = setTimeout("Moves()", 50)
  103.         end if
  104. End Sub
  105. </SCRIPT>
  106.  
  107. <SCRIPT LANGUAGE=VBScript>
  108. function Guess()
  109.   dim r, srcElement
  110.   set srcElement = window.event.srcElement
  111.   if (srcElement.id="squid1") then
  112.      srcElement.src = "gem.gif"
  113.   else
  114.      srcElement.src = "wrong.gif"
  115.   end if
  116. end function
  117. </SCRIPT>
  118. </BODY>
  119. </HTML>
  120.